package com.boang.service.impl;

import com.boang.dao.UserDao;
import com.boang.po.User;
import com.boang.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public User getById(Integer id) {
        User user = userDao.selectById(id);
        return user;
    }

    @Override
    public void addOne(User user) {
        userDao.insert(user);
    }

    @Override
    public List<User> list() {
        return userDao.list();
    }
}
